* menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 20:25:23 +0000 (13:25 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Apr 2011 20:25:23 +0000 (13:25 -0700)
src/ChangeLog
src/menu.c

index a822b31f688defe7f41813ac542184e3e98ca720..afbf144ba495e2d7854b5b146dda06baf922b00b 100644 (file)
@@ -2,6 +2,8 @@
 
        Fix more problems found by GCC 4.6.0's static checks.
 
+       * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
+
        * fns.c (Fstring_to_unibyte): Don't rely on undefined behavior
        by passing a long int to a printf format expecting an int.
 
index a9098deed7e4ad6936cde59a802b7ba85999d6e1..3bfb74863ae3a79b33f971ab0e07d4136d18472a 100644 (file)
@@ -1340,7 +1340,7 @@ no quit occurs and `x-popup-menu' returns nil.  */)
 
   UNGCPRO;
 
-  if (error_name) error (error_name);
+  if (error_name) error ("%s", error_name);
   return selection;
 }